# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=emacs-closql
pkgver=1.2.1_git20240712
_gitrev=ebfb860510d895ebcbbe920dd0d86381f1b6504c
pkgrel=0
_pkgreal=closql
pkgdesc="Store uniform EIEIO objects in an EmacSQL database"
url="https://github.com/magit/closql"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	cmd:emacs
	emacs-compat
	emacs-emacsql-sqlite
	"
makedepends="emacs-nox"
source="https://github.com/magit/closql/archive/$_gitrev/emacs-closql-$_gitrev.tar.gz"
builddir="$srcdir/$_pkgreal-$_gitrev"
options="!check" # no tests provided

build() {
	emacs -batch -q -no-site-file -L . \
		-eval '(setq byte-compile-error-on-warn t)' \
		-f batch-byte-compile \
		./*.el
}

package() {
	install -Dvm644 ./*.el ./*.elc \
		-t "$pkgdir"/usr/share/emacs/site-lisp/

	cd "$pkgdir"/usr/share/emacs/site-lisp
	emacs -batch -q -no-site-file \
		-eval "(loaddefs-generate \".\" \"$_pkgreal-loaddefs.el\")"
}

sha512sums="
3f78bd52542f6d0189446ed538fd727abeda8144dd7c0d460870f68e30a2493cd745847d974e185d258a06fddbaef71c160e75574b278fbc31783ecb78593d2d  emacs-closql-ebfb860510d895ebcbbe920dd0d86381f1b6504c.tar.gz
"
